package com.yuhanginfo.modules.sys.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.yuhanginfo.common.service.CrudService;
import com.yuhanginfo.modules.sys.entity.OrdersDetail;
import com.yuhanginfo.modules.sys.entity.User;
import com.yuhanginfo.modules.sys.dao.OrdersDetailDao;
import com.yuhanginfo.modules.sys.dao.UserDao;

/**
 * 订单详情Service
 * @author yangs
 * @version 2017-09-18
 */
@Service
@Transactional(readOnly = true)
public class OrdersDetailService extends CrudService<OrdersDetailDao, OrdersDetail> {
    @Autowired
    private OrdersDetailDao ordersDetailDao;
    @Autowired
    private UserDao userDao;
    

	
	@Transactional(readOnly = false)
	public void save(OrdersDetail ordersDetail) {
		super.save(ordersDetail);
	}
	
	@Transactional(readOnly = false)
	public void delete(OrdersDetail ordersDetail) {
		super.delete(ordersDetail);
	}
 
	
	public User Item(String id){
		return userDao.getUser(id);
		
	}
	public List<OrdersDetail> selectByOrderCode(String code) {
		
		return ordersDetailDao.selectByOrderCode(code);
	}

	public List<OrdersDetail> selectByGoodsComboCode(String code) {
		return ordersDetailDao.selectByGoodsComboCode(code);
	}
	
}